standardCharacter={
	characters:{
		caocao:['male','wei',4,['hujia','jianxiong'],'zhu'],
		simayi:['male','wei',3,['fankui','guicai']],
		xiahoudun:['male','wei',4,['ganglie']],
		zhangliao:['male','wei',4,['tuxi']],
		xuzhu:['male','wei',4,['luoyi']],
		guojia:['male','wei',3,['tiandu','yiji']],
		zhenji:['female','wei',3,['luoshen','qingguo']],
		liubei:['male','shu',4,['rende','jijiang1','jijiang2'],'zhu'],
		guanyu:['male','shu',4,['wusheng']],
		zhangfei:['male','shu',4,['paoxiao']],
		zhugeliang:['male','shu',3,['guanxing','kongcheng']],
		zhaoyun:['male','shu',4,['longdan1','longdan2']],
		machao:['male','shu',4,['mashu','tieji']],
		huangyueying:['female','shu',3,['jizhi','qicai']],
		sunquan:['male','wu',4,['zhiheng','jiuyuan'],'zhu'],
		ganning:['male','wu',4,['qixi']],
		lvmeng:['male','wu',4,['keji']],
		huanggai:['male','wu',4,['kurou']],
		zhouyu:['male','wu',3,['yingzi','fanjian']],
		daqiao:['male','wu',3,['guose','liuli']],
		luxun:['male','wu',3,['qianxun','lianying']],
		sunshangxiang:['female','wu',3,['xiaoji','jieyin']],
		huatuo:['male','qun',3,['qingnang','jijiu']],
		lvbu:['male','qun',4,['wushuang1','wushuang2']],
		diaochan:['female','qun',3,['lijian','biyue']],
	},
	skills:{
		hujia:{
			can_trigger:'AskForRespond',
			filter:function(player,event){
				if(player!=event.player) return false;
				if(player.identity!='zhu') return false;
				return canRespond('shan',event);
			},
			content:function(step){
				switch(step){
					case 0:
					evt.current=evt.player.next;
					break;

					case 1:
					if(evt.current.group!='wei')
						goto(3)
					else{
						openPrompt('护驾：替'+get.name(evt.player)+'打出一张【闪】')
						AskForRespond(evt.current,'shan',$);
					}
					break;

					case 2:
					if(evt.result.bool){
						api.respondShan();
						finish();
						return;
					}
					break;

					case 3:
					evt.current=evt.current.next;
					if(evt.current==evt.player)
						finish();
					else
						goto(1);
				}
			}
		},
		jianxiong:{
			can_trigger:'DamageEnd',
			content:function(){
				GainCards(evt.evt.cards);
			}
		},
		fankui:{
			can_trigger:'DamageEnd',
			filter:function(self,event){
				if (self!=event.player) return false;
				if(event.source==undefined) return false;
				if(event.source.handcards.length+event.source.equips.length==0) return false;
				return true;
			},
			content:function(step){
				switch(step){
					case 0:
					ChooseCard(evt.player,evt.evt.source,'he');
					break;

					case 1:
					GainCards(evt.result.cards);
					break;

					default:
					finish();
				}
			}
		},
		guicai:{
			will_trigger:'JudgeBefore',
			trigger_prompt:false,
			filter:true,
			content:function(step){
				switch(step){
					case 0:
					Ask({
						filter_card:'black',
						select_card:1,
						prompt:['选择要代替的牌',evt.evt.card]
					})
					break;

					case 1:
					if(evt.result.bool){
						LoseCards(evt.result.cards);
						evt.evt.card=evt.result.cards[0];
						openPrompt(get.name(evt.player)+'发动鬼才',evt.result.cards[0]);
						delay(2);
					}
					break;

					default:
					finish();
				}
			}
		},
		ganglie:{
			can_trigger:'DamageEnd',
			filter:function(player,event){
				if (player!=event.player) return false;
				if(event.source==undefined) return false;
				return true;
			},
			content:function(step){
				switch(step){
					case 0:
					AskForDiscard(evt.evt.source,2,'h');
					break;

					case 1:
					if(evt.result.bool==false)
						Damage(evt.evt.source);
					break;

					default:
					finish();
				}
			}
		},
		tuxi:{
			will_trigger:'PhaseDrawBefore',
			trigger_prompt:false,
			content:function(step){
				switch(step){
					case 0:
					AskForTarget([1,2],[filter.target.others,filter.target.hasHandcards],'突袭：跳过摸牌阶段，选择1~2名角色各抽取一张手牌');
					break;

					case 1:
					if(evt.result.bool){
						for(var i in evt.result.targets){
							GainCards(evt.result.targets[i].handcards[0]);
						}
						var str=get.name(evt.player)+'从';
						if(evt.result.targets.length==2)
							str+=get.name(evt.result.targets[0])+'、'+get.name(evt.result.targets[0])+'各';
						else
							str+=get.name(evt.result.targets[0])+'处';
						openPrompt(str+'拿了一张牌');
						delay(2);
						addSkip('PhaseDraw');
					}
					break;

					default:
					finish();
				}
			}
		},
		luoyi:{
			can_trigger:"PhaseDrawBefore",
			content:function(){
				evt.evt.num--;
				addPhaseSkill('luoyi2');
			}
		},
		luoyi2:{
			will_trigger:'DamageBegin',
			filter:function(player,event){
				if(player!=event.source) return false;
				if(event.card.name!='sha'&&event.card.name!='juedou') return false;
				return true;
			},
			content:function(){
				evt.evt.num++;
			}
		},
		tiandu:{
			can_trigger:'JudgeAfter',
			content:function(){
				GainCards(evt.evt.card);
			}
		},
		yiji:{
			can_trigger:'DamageEnd',
			content:function(step){
				switch(step){
					case 0:
					evt.count=evt.evt.num;
					if(evt.count==0){
						finish();
						return;
					}
					break;

					case 1:
					evt.cards=getCards(2);
					openPrompt('选择要送人的卡牌',evt.cards);
					Ask({
						filter_button:true,
						select_button:[1,2],
						filter_target:filter.target.others,
						select_target:[1,2],
					})
					break;

					case 2:
					if(evt.result.bool){
						if(evt.result.targets.length==1){
							GainCards(evt.result.targets[0],evt.result.buttons[0].link);
							openPrompt(get.name(evt.result.targets[0])+'获赠一张牌')
						}
						else if(evt.result.targets.length==2){
							GainCards(evt.result.targets[0],evt.result.buttons[0].link);
							GainCards(evt.result.targets[1],evt.result.buttons[1].link);
							openPrompt(get.name(evt.result.targets[0])+'、'+get.name(evt.result.targets[1])+'获赠一张牌')
						}
						GainCards(evt.left);
						delay(2);
					}
					else{
						GainCards(evt.cards);
					}
					break;

					case 3:
					evt.count--;
					closePrompt();
					if(evt.count>0)
						ChooseBool('是否发动技能【遗计】？')
					else
						finish();
					break;

					case 5:
					if(evt.result.bool)
						goto(1);
					break;

					default:
					finish();
				}
			}
		},
		luoshen:{
			can_trigger:'PhaseJudgeBefore',
			content:function(step){
				switch(step){
					case 0:
					Judge({good:'black'});
					break;

					case 1:
					if(evt.result.bool){
						GainCards(evt.result.card);
						ChooseBool('是否再次发动？')
					}
					else
						finish();
					break;

					case 2:
					if(evt.result.bool)
						goto(0);
					break;

					default:
					finish();
				}
			}
		},
		qingguo:{
			filter_card:['black','h'],
			select_card:1,
			view_as:'shan',
			select_prompt:'倾国：将一张黑色手牌当【闪】使用'
		},
		rende:{
			can_use:true,
			use_limit:1,
			filter_card:'h',
			select_card:[1,999],
			filter_target:filter.target.others,
			select_target:1,
			content:function(step){
				switch(step){
					case 0:
					GainCards(evt.cards);
					break;

					case 1:
					if(evt.cards.length>1)
						Recover(evt.player);
					break;

					case 2:
					finish();
				}
			}
		},
		jijiang1:{
			can_use:function(){
				return canUse('sha');
			},
			auto_confirm:true,
			use_prompt:false,
			content:function(step){
				switch(step){
					case 0:
					evt.current=evt.player.next;
					AskForTarget(api.canUseSha);
					break;

					case 1:
					if(evt.result.bool==false)
						finish();
					else
						evt.targets=evt.result.targets;
					break;

					case 2:
					if(evt.current.group!='shu')
						goto(4)
					else{
						openPrompt('激将：替'+get.name(evt.player)+'打出一张【杀】')
						AskForRespond(evt.current,'sha',$);
					}
					break;

					case 3:
					if(evt.result.bool){
						evt.cards=evt.result.cards;
						goto(5);
					}
					break;

					case 4:
					evt.current=evt.current.next;
					if(evt.current==evt.player)
						finish();
					else
						goto(1);
					break;

					case 5:
					if(evt.cards.length==1&&evt.cards[0].name=='sha')
						evt.card=evt.cards[0];
					else
						evt.card={name:'sha'};
					Use({
						card:evt.card,
						cards:evt.cards,
						targets:evt.targets
					})
					break;

					default:
					finish();
				}
			}
		},
		jijiang2:{
			can_trigger:'AskForRespond',
			filter:function(player,event){
				if(player!=event.player) return false;
				if(player.identity!='zhu') return false;
				return canRespond('sha',event);
			},
			content:function(step){
				switch(step){
					case 0:
					evt.current=evt.player.next;
					break;

					case 1:
					if(evt.current.group!='shu')
						goto(3)
					else{
						openPrompt('激将：替'+get.name(evt.player)+'打出一张【杀】')
						AskForRespond(evt.current,'shan',$);
					}
					break;

					case 2:
					if(evt.result.bool){
						api.respondShan();
						finish();
						return;
					}
					break;

					case 3:
					evt.current=evt.current.next;
					if(evt.current==evt.player)
						finish();
					else
						goto(1);
				}
			}
		},
		wusheng:{
			filter_card:'red',
			select_card:1,
			view_as:'sha',
			select_prompt:'武圣：将一张红色牌当【杀】使用'
		},
		paoxiao:{
			mod:{
				type:'limit',
				content:{
					sha:999
				}
			}
		},
		guanxing:{
			can_trigger:'PhaseDrawBefore',
			content:function(step){
				switch(step){
					case 0:
					evt.num=Math.min(5,game.players.length);
					openDialog({
						caption:'',
						list:getCards(evt.num)
					});
					break;

					case 1:
					changeCaption('按顺序选择要置于牌堆底的牌');
					Choose($,[0,game.players.length]);
					break;

					case 2:
					evt.bottom=new Array();
					evt.bottom_buttons=evt.result.buttons.slice(0);
					for(var i=0;i<evt.result.buttons.length;i++){
						disableButton(evt.result.buttons[i]);
						evt.bottom.splice(0,0,evt.result.buttons[i].link);
					}
					break;

					case 3:
					changeCaption('按顺序选择要置于牌堆顶的牌');
					Choose($,evt.num-evt.bottom.length,'unforced');
					break;

					case 4:
					if(evt.result.bool){
						evt.top=new Array();
						for(var i=0;i<evt.result.buttons.length;i++)
							evt.top.splice(0,0,evt.result.buttons[i].link);
					}
					else{
						for(var i in evt.bottom_buttons)
							enableButton(evt.bottom_buttons[i]);
						goto(1);
					}
					break;

					case 5:
					closeDialog();
					openPrompt(get.name(evt.player)+'发动了观星，将'+evt.top.length+'张牌置于牌堆顶')
					delay(2);
					while(evt.bottom.length>0)
						ui.cardPile.appendChild(evt.bottom.shift());
					while(evt.top.length>0)
						ui.cardPile.insertBefore(evt.top.shift(),ui.cardPile.firstChild);
					finish();
				}
			}
		},
		kongcheng:{
			mod:{
				type:'disable_target',
				content:function(player,card){
					if(player.handcards.length>0) return false;
					if(card.name=='sha'||card.name=='juedou') return true;
					return false;
				}
			}
		},
		longdan1:{
			filter_card:'shan',
			select_card:1,
			view_as:'sha',
			select_prompt:'龙胆：将一张【闪】当【杀】使用'
		},
		longdan2:{
			filter_card:'sha',
			select_card:1,
			view_as:'shan',
			select_prompt:'龙胆：将一张【杀】当【闪】使用'
		},
		mashu:{
			mod:{
				type:'distance',
				content:{
					global_from:-1
				}
			}
		},
		tieji:{
			can_trigger:'ShaBegin',
			content:function(step){
				switch(step){
					case 0:
					Judge({good:'red'});
					break;

					case 1:
					if(evt.result.bool){
						api.directHit();
						openPrompt('铁骑判定成功，【杀】不可闪避');
						delay(2);
					}
					break;

					default:
					closePrompt();
					finish();
				}
			}
		},
		jizhi:{
			can_trigger:'UseCard',
			auto_confirm:true,
			filter:function(player,event){
				if(player!=event.player) return false;
				return filter.card.isNotDelay(event.card)
			},
			content:function(){
				DrawCards();
			}
		},
		qicai:{
			mod:{
				type:'distance',
				filter:function(player,card){
					if(card==undefined) return false;
					if(player!=evt.player) return false;
					if(evt.name!='AskForUse') return false;
					return (get.type(card)=='trick')
				},
				content:{
					global_from:-99
				}
			}
		},
		zhiheng:{
			can_use:true,
			filter_card:true,
			select_card:[1,999],
			filter_target:filter.target.self,
			select_prompt:'制衡：弃置任意数量的牌并摸等量的牌',
			use_limit:1,
			content:function(){
				DrawCards(evt.cards.length);
			}
		},
		jiuyuan:{
			will_trigger:'RecoverBegin',
			filter:function(player,event){
				if(player.identity!='zhu') return false;
				if(player!=event.player) return false;
				if(player.hp>0) return false;
				if(event.source!='wu') return false;
				if(event.source==player) return false;
				return true;
			},
			content:function(){
				evt.evt.num++;
			}
		},
		qixi:{
			filter_card:['black','h'],
			select_card:1,
			view_as:'guohe',
			select_prompt:'过河拆桥：将一张黑色手牌当【过河拆桥】使用'
		},
		keji:{
			can_trigger:'PhaseDiscardBefore',
			filter:function(player,event){
				if(player!=event.player) return false
				return (history.count('sha')==0)
			},
			content:function(){
				addSkip('PhaseDiscard');
			}
		},
		kurou:{
			can_use:true,
			select_prompt:'苦肉：流失一点体力并摸两张牌',
			content:function(){
				ChangeHp(-1);
				DrawCards(2);
			}
		},
		yingzi:{
			can_trigger:'PhaseDrawBefore',
			auto_confirm:true,
			content:function(){
				evt.evt.num++;
			}
		},
		fanjian:{
			can_use:true,
			use_limit:1,
			filter_target:filter.target.others,
			select_target:1,
			content:function(step){
				switch(step){
					case 0:
					openConfirm('diamond2','heart2','club2','spade2');
					ChooseConfirm();
					break;

					case 1:
					evt.suit=evt.result.confirm;
					openPrompt(get.name(evt.target)+'选择了'+translate(evt.suit));
					delay(2);
					break;

					case 2:
					ChooseCard(evt.target,evt.player,'h');
					break;

					case 3:
					evt.card=evt.result.buttons[0].link;
					openPrompt(get.name(evt.target)+'抽中了【'+get.name_info(evt.card)+'】',evt.card);
					delay(2);
					break;

					case 4:
					if(get.suit(evt.card)+'2'!=evt.suit)
						Damage();
					break;

					case 5:
					GainCards(evt.card);

					case 6:
					finish();
				}
			}
		},
		guose:{
			filter_card:['diamond','h'],
			select_card:1,
			view_as:'lebu',
			select_prompt:'国色：将一张方片花色的手牌当【乐不思蜀】使用'
		},
		liuli:{
			liuli_trigger:'ShaBegin',
			filter:function(player,event){
				if(player!=event.target) return false;
				var count=0;
				for(var i in game.players){
					if(game.players[i]==player) continue;
					if(get.distance(player,game.players[i])<=1&&game.players[i]!=event.player) return true;
				}
				return false;
			},
			content:function(step){
				switch(step){
					case 0:
					Ask({
						filter_card:true,
						select_card:1,
						filter_target:function(target){
							return (target!=evt.parent.evt.player);
						},
						select_target:1
					});
					break;

					case 1:
					if(evt.result.bool==false){
						finish();
						return;
					}
					Discard(evt.result.cards);
					evt.evt.target=evt.result.targets[0];
					finish();
				}
			}
		},
		qianxun:{
			mod:{
				type:'disable_target',
				content:function(player,card){
					if(card.name=='lebu'||card.name=='shunshou') return true;
					return false;
				}
			}
		},
		lianying:{
			can_trigger:'LoseCard',
			filter:function(player,event){
				if(player!=event.player) return false;
				if(player.handcards.length>0) return false;
				return true;
			},
			content:function(){
				DrawCards();
			}
		},
		xiaoji:{
			can_trigger:'LoseCard',
			filter:function(player,event){
				if(player!=event.player) return false;
				return (event.position=='equips');
			},
			content:function(){
				DrawCards(2);
			}
		},
		jieyin:{
			can_use:true,
			use_limit:1,
			filter_card:'h',
			select_card:2,
			filter_target:[filter.target.others,filter.target.lostHp,filter.target.male],
			select_target:1,
			content:function(){
				Recover();
				Recover(evt.player);
			}
		},
		qingnang:{
			can_use:true,
			use_limit:1,
			filter_card:'h',
			select_card:1,
			filter_target:filter.target.lostHp,
			select_target:1,
			content:function(){
				Recover();
			}
		},
		jijiu:{
			can_use:function(){
				if(evt.reason!='Dying') return false;
				return (game.current!=evt.player);
			},
			filter_card:'red',
			select_card:1,
			view_as:'tao',
			select_prompt:'急救：将一张红色的手牌当【桃】使用'
		},
		wushuang1:{
			will_trigger:'ShaMiss',
			content:function(step){
				switch(step){
					case 0:
					AskForRespond('shan',evt.evt.target);
					break;

					case 1:
					if(evt.result.bool==false){
						evt.evt.result={bool:false};
					}
					else
						trigger('ShaMiss');
					finish();
				}
			}
		},
		wushuang2:{
			will_trigger:'Juedou',
			filter:function(player,event){
				if(player!=event.player&&player!=event.target) return false;
				return (event.turn!=player)
			},
			content:function(step){
				switch(step){
					case 0:
					AskForRespond('sha',evt.evt.turn);
					break;

					case 1:
					if(evt.result.bool==false){
						skip(evt.evt,2);
						evt.evt.result={bool:false};
					}
					finish();
				}
			}
		},
		lijian:{
			can_use:true,
			use_limit:5,
			filter_card:true,
			select_card:1,
			filter_target:filter.target.male,
			select_target:2,
			multi_target:true,
			use_limit:1,
			select_prompt:'离间：弃一张牌，视为一名男性角色对另一名男性角色使用一张【决斗】',
			content:function(){
				Use({
					player:evt.targets[0],
					targets:[evt.targets[1]],
					card:{
						name:'juedou'
					}
				})
			}
		},
		biyue:{
			can_trigger:'PhaseEnd',
			auto_confirm:true,
			filter:function(){
				return (game.current==evt.player);
			},
			content:function(){
				DrawCards();
			}
		}
	},
	translate:{
		caocao:'曹操',
		simayi:'司马懿',
		xiahoudun:'夏侯惇',
		zhangliao:'张辽',
		xuzhu:'许褚',
		guojia:'郭嘉',
		zhenji:'甄姬',
		liubei:'刘备',
		guanyu:'关羽',
		zhangfei:'张飞',
		zhugeliang:'诸葛亮',
		zhaoyun:'赵云',
		machao:'马超',
		huangyueying:'黄月英',
		sunquan:'孙权',
		ganning:'甘宁',
		lvmeng:'吕蒙',
		huanggai:'黄盖',
		zhouyu:'周瑜',
		daqiao:'大乔',
		luxun:'陆逊',
		sunshangxiang:'孙尚香',
		huatuo:'华佗',
		lvbu:'吕布',
		diaochan:'貂蝉',
		hujia:'护驾',
		jianxiong:'奸雄',
		fankui:'反馈',
		guicai:'鬼才',
		ganglie:'刚烈',
		tuxi:'突袭',
		luoyi:'裸衣',
		luoyi2:'裸衣',
		tiandu:'天妒',
		yiji:'遗计',
		luoshen:'洛神',
		qingguo:'倾国',
		rende:'仁德',
		jijiang1:'激将',
		jijiang2:'激将',
		wusheng:'武圣',
		paoxiao:'咆哮',
		guanxing:'观星',
		kongcheng:'空城',
		longdan1:'龙胆',
		longdan2:'龙胆',
		mashu:'马术',
		tieji:'铁骑',
		jizhi:'集智',
		qicai:'奇才',
		zhiheng:'制衡',
		jiuyuan:'救援',
		qixi:'奇袭',
		keji:'克己',
		kurou:'苦肉',
		yingzi:'英姿',
		fanjian:'反间',
		guose:'国色',
		liuli:'流离',
		qianxun:'谦逊',
		lianying:'连营',
		xiaoji:'枭姬',
		jieyin:'结姻',
		qingnang:'青囊',
		jijiu:'急救',
		wushuang1:'无双',
		wushuang2:'无双',
		lijian:'离间',
		biyue:'闭月'
	}
}